{extend name='/forgot/forgota' /}
{block name='main'}
<!--登录开始-->
<div class="login_content">
    <div class="login_auto">
        <div class="login_top">
            <a href=""><img src="/public/static/password/logo.gif" width="190" height="88" alt=""></a>
            <h1>验证身份</h1>
        </div>
        <div class="forget_body">
            <div class="forget_top">
                <div class="step">
                    <div class="num current">1</div>
                    <div class="line current"></div>
                    <div class="num current">2</div>
                    <div class="line current"></div>
                    <div class="num">3</div>
                    <div class="line"></div>
                    <div class="f_success"></div>
                </div>
                <div class="forget_text">
                    <span class="current">填写帐号</span>
                    <span class="current">验证身份</span>
                    <span>重设密码</span>
                    <span class="last">完成</span>
                </div>
            </div>
            <div class="forget_cent">
                <div class="forget_u">
                <form id="fp_fm" name="fp_fm" method="post" action=""> 
                    <div class="forget_list">
                        <span>手机号码：</span>
                        <div class="my_phone" id='tel'>{:input("session.forgot.tel")}</div>
                    </div>
                    <div class="forget_list">
                        <span>短信验证码：</span>
                        <div class="yzm borderd">
                        <input type="text" id="yzm" name="yzm" class="w80" value="" maxlength='5'>
                        <input type="hidden" id="code" name="code" class="w80" value="k2tr">
                        <div class="k_em">
                        <em class="tip suc" id="yzm_tip" style="display:none;"></em></div></div>
                        <!-- <div class="get_message tip" id="dhuoqu" style="display:none;">获取短信验证码</div> -->
                        <a href="javascript:void(0)" id='huohuo'>
                        <!-- <div class="get_message" id="huoqu" style="display:block;">获取短信验证码</div> -->
                        <input class="get_message" style='width:155px;' id="huoqu" type="button" value="点击获取验证码" onclick="sendMessage()" /></p>
                        </a>
                        <!-- <div class="k_em"><div class="tip err" id="yzm_tip" style="display:block;">请输入短信验证码</div></div> -->
                        <br><br><br> 
                        <div style='width:250px;'>
                        <div id="login_tip" style="display:none;" class="login_tip mt10">请输入收到的验证码</div>
                            
                        </div>
                    </div>
                    <div class="forget_list">
                  
                        <div class="login_btn left"><a href="javascript:void(0)" id="to_third_step">下一步</a></div>
                    </div>
                </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!--登录结束-->
<!-- 底部开始 -->
<!--底部开始-->
<div  class="login_content">

    <div class="footer_auto">

        <div class="footer_bot">

            <p class="link"><a target="_blank" href="javascript:void(0)">关于波奇</a><span>|</span><a target="_blank" href="javascript:void(0)">友情链接</a><span>|</span><a target="_blank" href="javascript:void(0)">诚聘英才</a><span>|</span><a target="_blank" href="javascript:void(0)">联系我们</a><span>|</span><a target="_blank" href="javascript:void(0)">网站地图</a><span>|</span><a target="_blank" href="javascript:void(0)">意见反馈</a><span>|</span><a target="_blank" href="javascript:void(0)">帮助中心</a><span>|</span>客服热线：400-820-6098</p>

            <p class="copy">Copyright © 2007-2017 Boqii.com All Rights Reserved 光橙（上海）信息科技有限公司 版权所有 <a href="http://www.miibeian.gov.cn/" target="_blank">沪ICP备13034501号-2</a>&nbsp;增值电信业务经营许可证：<a href="http://www.miibeian.gov.cn/" target="_blank">沪B2-20140120</a></p>

            <p>

                <a href='http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&entyId=20131022163114962' target='_blank' rel='nofollow'><img src='/public/static/image/register/foot_gs.png' width="100" height="35"></a>

                <a href="http://www.boqii.com/ads.php" target="_blank" rel="nofollow"><img src="/public/static/image/register/foot_cx.png" width="100" height="35"></a>

                <a href="https://ss.knet.cn/verifyseal.dll?sn=e14111831011556282oicb000000&ct=df&a=1&pa=0.1636424780320953" target="_blank" rel="nofollow"><img src="/public/static/image/register/foot_kx.png" width="100" height="35"></a>

                <a href="http://www.zx110.org/" target="_blank" rel="nofollow"><img src="/public/static/image/register/foot_zx.png" width="100" height="35"></a>

            </p>

        </div>

    </div>

</div>
<script>
    $('#huoqu').click(function(){
        var InterValObj; //timer变量，控制时间
        var count = 60; //间隔函数，1秒执行
        var curCount;//当前剩余秒数
          　curCount = count;
        　　//设置button效果，开始计时
             $("#huoqu").attr("disabled", "true");
             $("#huoqu").val("请在" + curCount + "秒内输入验证码");
             InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器，1秒执行一次
        　　  //向后台发送处理数据
            var yzm = $('#yzm').val();
            var tel = $('#tel').html();
            $.ajax({
                url:"{:url('index/Forgot/send')}",
                type:'post',
                data:{
                    'yzm':yzm,
                    'tel':tel,
                },
                success:function(d){
                  
                }
            });
 

        //timer处理函数
        function SetRemainTime() {
                    if (curCount == 0) {                
                        window.clearInterval(InterValObj);//停止计时器
                        $("#huoqu").removeAttr("disabled");//启用按钮
                        $("#huoqu").val("重新发送验证码");
                    }
                    else {
                        curCount--;
                        $("#huoqu").val("请在" + curCount + "秒内输入验证码");
                    }
                }
    });
        
        
        $('#to_third_step').click(function(){
        var yzm = $('#yzm').val();
            if(yzm == ''){
                $('#login_tip').attr('style', 'display:block');
                return false;
            }
            
            $.ajax({
                url:"{:url('index/Forgot/doSend')}",
                type:'post',
                data:{'yzm':yzm},
                success:function(d){
                    if(d == 'no'){
                         $('#login_tip').text('验证码不正确');
                        $('#login_tip').attr('style', 'display:block');
                    }else{
                        window.location = '{:url("index/Forgot/forgotc")}';
                    }
                }
            })
        });












        // $('#to_third_step').click(function(){
        // var yzm = $('#yzm').val();
        //     if(yzm == ''){
        //         $('#login_tip').attr('style', 'display:block');
        //     }else{
        //         if(yzm != send){
        //             $('#login_tip').text('验证码不正确');
        //             $('#login_tip').attr('style', 'display:block');
        //         }else{
        //             window.location = 'forgotc';

        //         }
        //     }
        // });
  
     


</script>
{/block}
<!--底部结束-->